home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 19.zip / BS1 part 19 / how to learn assembler.adf / CH4 / 4_1B1-sub.asm < prev    next >
Assembly Source File  |  1988-02-25  |  412b  |  15 lines

  1. ;(6.4B1) subtracting
  2. subtracting1:
  3.      clr.l    D0        ; Erase D0
  4.      move.l #table,a0   ; Put the address of table in A0
  5.      move     0(a0),d0  ; Put first entry in D0
  6.      sub      2(a0),d0  ; Add second entry
  7.      sub      4(a0),d0  ; Add third entry
  8.      sub      6(a0),d0  ; Add fourth entry
  9.      sub      8(a0),d0  ; Add fifth entry
  10.      rts                ; return
  11.  
  12. table:  dc.w  50,8,4,6
  13.  
  14.      end
  15.